package me.a_littlesquid.origin.utils;

import org.bukkit.entity.Player;
import org.bukkit.inventory.ItemStack;
import org.bukkit.inventory.PlayerInventory;

public class Bind {
    public static void bind(Player player , ItemStack item, PlayerInventory inventory){
            ItemStack mainhand=inventory.getItemInMainHand();
            inventory.remove(mainhand);
            inventory.setItemInMainHand(item);
            player.performCommand("bind");
            inventory.addItem(mainhand);
    }
}

